package com.lin.cloud.disk.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lin.cloud.disk.common.entity.request.AccountRequestDTO;
import com.lin.cloud.disk.entity.dto.LogicRemoveDTO;
import com.lin.cloud.disk.entity.dto.LogicRestoreDTO;
import com.lin.cloud.disk.entity.dto.PhysicistRemoveDTO;
import com.lin.cloud.disk.entity.pojo.Directory;
import com.lin.cloud.disk.entity.request.directory.GetDirectoryListRequest;
import com.lin.cloud.disk.entity.request.directory.IsExistParentDirectoryRequest;
import org.simpleframework.xml.Path;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * (Directory)表数据库访问层
 *
 * @author ljc
 * @since 2020-12-30 21:52:00
 */
@Repository
public interface DirectoryMapper extends BaseMapper<Directory> {


    /**
     * 获取父级目录
     * @param request
     * @return
     */
    Directory getParentDirectory(IsExistParentDirectoryRequest request);

    /**
     * 获取目录列表
     * @param request
     * @return
     */
    List<Directory> getDirectoryByList(GetDirectoryListRequest request);

    /**
     * 逻辑删除目录
     * @param logicRemoveDTO
     * @return
     */
    int logicRemoveDirectory(LogicRemoveDTO logicRemoveDTO);

    /**
     * 物理删除目录
     * @param physicistRemoveDTO
     * @return
     */
    int physicistRemoveDirectory(PhysicistRemoveDTO physicistRemoveDTO);

    /**
     * 逻辑恢复目录
     * @param logicRestoreDTO
     * @return
     */
    int logicRestoreDirectory(LogicRestoreDTO logicRestoreDTO);
}